package com.renhui.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import com.renhui.aidl.IUserVerifyInterface;

public class UserVerifyService extends Service {

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return iBinder;
    }

    IBinder iBinder = new IUserVerifyInterface.Stub() {
        @Override
        public boolean verifyUser(com.renhui.aidl.User user) {
            if (user == null || TextUtils.isEmpty(user.username) || TextUtils.isEmpty(user.password)) {
                return false;
            }
            return user.username.equals("Ren") && user.password.equals("123");
        }
    };

}
